<!--
*Author：富行天下团队
 
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *业务请在@/extension/Collection/Mall_preauthorization_qrcode.js此处编写
 -->
<template>
    <div style="height: 100px;width:100%">
        <view-grid
        id="gridwrap"
                   ref="grid"
                   height="100px"
                   :columns="columns"
                   :detail="detail"
                   :editFormFields="editFormFields"
                   :editFormFileds="editFormFields"
                   :editFormOptions="editFormOptions"
                   :searchFormFields="searchFormFields"
                   :searchFormFileds="searchFormFields"
                   :searchFormOptions="searchFormOptions"
                   :table="table"
                   :extend="extend">
        </view-grid>
   
    </div>
</template>

<script>
    import extend from "@/extension/Collection/Mall_preauthorization_qrcode.js";
    import ViewGrid from "@/components/basic/ViewGrid.vue";
    var vueParam = {
        components: {
            ViewGrid
        },
        data() {
            return {
   
                table: {
                    key: 'id',
                    footer: "Foots",
                    cnName: '预授权',
                    name: 'Mall_preauthorization_qrcode',
                    url: "/Mall_preauthorization_qrcode/",
                    sortName: "id"
                },
                extend: extend,
                editFormFields: {"qname":"","qtype":"","distributionid":"","status":"","Jump_href":"","Jump_href_qimg":"","protocol":""},
                editFormOptions: [[{"dataKey":"","data":[],"title":"收款场景","field":"qname","type":"input"},
                              {"dataKey":"addmap","data":[],"title":"场景分类","field":"qtype","type":"select"}],
                              [{"title":"公众号","field":"distributionid","type":"text"},
                               {"dataKey":"restatus","data":[],"title":"是否启用","field":"status","type":"switch"}],
                               [{"title":"跳转地址","field":"Jump_href","type":"text"},
                               {"title":"跳转地址二维码","field":"Jump_href_qimg","type":"text"}],
                              [{"title":"协议","field":"protocol","type":"textarea"}]],
                searchFormFields: {},
                searchFormOptions: [],
                columns: [{field:'id',title:'id',type:'int',width:90,hidden:true,readonly:true,require:true,align:'left'},
                       {field:'qname',title:'收款场景',type:'string',width:220,align:'left',sortable:true},
                       {field:'qtype',title:'场景分类',type:'int',bind:{ key:'addmap',data:[]},width:90,align:'left'},
                       {field:'distributionid',title:'公众号',type:'string',width:220,align:'left'},
                       {field:'status',title:'是否启用',type:'int',
                       bind:{
                        key: "",
                             data: [
                             { key: 0, value: "禁用" },
                             { key: 1, value: "启用" },
                           ]
                       },
                       width:90,align:'left'},
                       {field:'Jump_href',title:'跳转地址',type:'string',width:220,align:'left'},
                       {field:'Jump_href_qimg',title:'跳转地址二维码',type:'string',width:400,align:'left'},
                       {field:'merchantCode',title:'商户编码',type:'string',width:100,align:'left'},
                       {field:'merchantName',title:'商户名称',type:'string',width:100,align:'left'},
                       {field:'creator',title:'创建人',type:'string',width:100,align:'left'},
                       {field:'createID',title:'创建人ID',type:'int',width:90,hidden:true,align:'left'},
                       {field:'createDate',title:'创建时间',type:'datetime',width:180,align:'left',sortable:true},
                       {field:'modifier',title:'修改人',type:'string',width:90,align:'left'},
                       {field:'modifyID',title:'修改人ID',type:'int',width:90,hidden:true,align:'left'},
                       {field:'modifyDate',title:'修改时间',type:'datetime',width:90,align:'left',sortable:true},
                       {field:'input_type',title:'输入框状态（0空白1联系人）',type:'int',width:120,align:'left'},
                       {field:'protocol',title:'协议',type:'string',width:120,align:'left'}],
                detail: {
                    cnName:"#detailCnName",
                    columns: [],
                    sortName: "",
                    key:""
                }
            };
        }
    };
    export default vueParam;
</script>
<style  scoped>
/* /deep/#gridwrap .el-table__body-wrapper{
 height: auto !important;
}
/deep/#gridwrap .el-table {
 height: auto !important;
}
.formWrap{
  margin-top: 50px;
    width: 50%;
    margin-left: 30px;
  padding-bottom: 100px;

}
.button{
  margin-left: 100px;
} */
</style>
